using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using GlobalDefine;

namespace VoteMeApp
{
    public partial class frmLogon : Form
    {
        public frmLogon()
        {
            InitializeComponent();
            initForm();
        }

        private void initForm()
        {
            //throw new Exception("The method or operation is not implemented.");
            //set visable
            btnAddUser.Visible = false;
            txtNewer.Visible = false;

            cmbUsers.Visible = true;
            btnReg.Visible = true;
            btnLogon.Visible = true;
            btnExit.Visible = true;
            
            
            //load users from ini;
            string[] strUsers = VariableDefine.strUsers.Split('|');
            for (int i = 0; i < strUsers.Length; i++)
            {
                cmbUsers.Items.Add(strUsers[i]);
            }
        }

        private void btnExit_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void btnReg_Click(object sender, EventArgs e)
        {
            //set visable
            btnAddUser.Visible = true;
            txtNewer.Visible = true;

            cmbUsers.Visible = false;
            btnReg.Visible = false;
            btnLogon.Visible = false;
            btnExit.Visible = false;
        }

        private void btnAddUser_Click(object sender, EventArgs e)
        {

        }

    }
}